package com.chen.recruit.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.hutool.core.date.DatePattern;
import com.chen.recruit.common.constants.SysConstants;
import com.chen.recruit.common.enums.BusinessStatus;
import com.chen.recruit.common.enums.BusinessType;
import lombok.Data;

import java.util.Date;

/**
 * 操作日志对象 t_operate_log
 *
 * @author cgy
 * @date 2022-08-17
 */
@Data
public class OperateLog {

    private static final long serialVersionUID = 1L;

    /**
     * 操作日志主键
     */
    private Integer id;
    /**
     * 操作模块
     */
    @Excel(name = "操作模块", width = 20)
    private String module;
    /**
     * 业务类型（0新增 1修改 2删除）
     */
    @Excel(name = "业务类型", width = 20, enumExportField = SysConstants.ENUM_EXPORT_FIELD)
    private BusinessType businessType;
    /**
     * 方法名称
     */
    @Excel(name = "方法名称", width = 20)
    private String method;
    /**
     * 请求方式
     */
    @Excel(name = "请求方式", width = 20)
    private String reqMethod;
    /**
     * 操作人员
     */
    @Excel(name = "操作人员", width = 20)
    private String operator;
    /**
     * 请求URL
     */
    @Excel(name = "请求URL", width = 20)
    private String reqUrl;
    /**
     * 主机地址
     */
    @Excel(name = "操作IP", width = 20)
    private String ip;
    /**
     * 操作地点
     */
    @Excel(name = "操作地点", width = 20)
    private String location;
    /**
     * 请求参数
     */
    @Excel(name = "请求参数", width = 20)
    private String reqParam;
    /**
     * 响应参数
     */
    @Excel(name = "响应参数", width = 20)
    private String respParam;
    /**
     * 操作状态（0成功 1失败）
     */
    @Excel(name = "操作状态", width = 20, enumExportField = SysConstants.ENUM_EXPORT_FIELD)
    private BusinessStatus status;
    /**
     * 操作时间
     */
    @Excel(name = "操作时间", width = 20, format = DatePattern.NORM_DATETIME_PATTERN)
    private Date operateTime;

}
